//
//  RefershHelper.m
//  MJRefreshExample
//
//  Created by  on 15/9/12.
//  Copyright (c) 2015年 小码哥. All rights reserved.
//

#import "RefershHelper.h"

@implementation RefershHelper
+(MJRefreshNormalHeader*)headerWithRefreshingBlock:(HeaderWithRefreshingBlock)headerWithRefreshingBlock{
    MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
        headerWithRefreshingBlock();
    }];
    
    // 设置文字
//    header.backgroundColor = [UIColor whiteColor];
    // 隐藏时间
//    header.lastUpdatedTimeLabel.hidden = YES;
    // 设置字体
    header.stateLabel.font = [UIFont systemFontOfSize:12];
//    header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:12];
    
    // 设置颜色
//    header.stateLabel.textColor = BLACK_COLOR_102;
//    header.backgroundColor = COLOR_ALPHA(0, 0, 0, 0.7);
//    header.lastUpdatedTimeLabel.textColor = BLACK_COLOR_102;
//    [header setImages:[UIImage imageNamed:@"ss"] forState:MJRefreshStateIdle];
//    header.
    return header;
}

+(MJRefreshAutoNormalFooter*)footerWithRefreshingBlock:(FooterWithRefreshingBlock)footerWithRefreshingBlock{
    MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
        footerWithRefreshingBlock();
    }];
    
    // 设置文字
//    [footer setTitle:@"Click or drag up to refresh" forState:MJRefreshStateIdle];
//    [footer setTitle:@"Loading more ..." forState:MJRefreshStateRefreshing];
//    [footer setTitle:@"No more data" forState:MJRefreshStateNoMoreData];
    
    // 设置字体
    footer.stateLabel.font = [UIFont systemFontOfSize:12];
    
    // 设置颜色
//    footer.stateLabel.textColor = BLACK_COLOR_102;
    
//    [footer endRefreshingWithNoMoreData];
    
    
    return footer;

}

+(MJRefreshBackNormalFooter*)backFooterWithRefreshingBlock:(FooterWithRefreshingBlock)footerWithRefreshingBlock{
    MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
        footerWithRefreshingBlock();
    }];
    footer.stateLabel.font = [UIFont systemFontOfSize:12];
    return footer;
}


@end
